<!-- 导航URL -->
<div class="row wrapper border-bottom white-bg page-heading">
	<div class="col-md-12">
		<ol class="breadcrumb">
			<li><a>主页</a></li>
			<li><a>商户管理</a></li>
			<li class="active"><strong>商户进件详情</strong></li>
		</ol>
	</div>
</div>

<!-- 主要内容 -->
<div class="wrapper wrapper-content animated fadeIn" ng-app
	 ng-controller="merchantDetailCtrl">
	<form class="form-horizontal" id="form1">
		<div class="row">
			<div class="col-lg-12">
				<div class="tabs-container tab_other">
					<uib-tabset>
						<uib-tab>
							<uib-tab-heading>
								<span class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
										class="font-bold">审核信息</strong>
								</span>
							</uib-tab-heading>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>基本信息</h5>
								</div>
								<div class="ibox-content">

									<div class="form-group">
										<label class="col-sm-2 control-label">商户进件编号：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.id">
										</div>

										<label class="col-sm-2 control-label">商户编号：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.merchantNo">
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">商户名称：</label>
										<div class="col-sm-2 checkbox" ng-bind="info.merchantName">
										</div>

										<label class="col-sm-2 control-label">手机号：</label>
										<div class="col-sm-2 checkbox" >
											<span ng-bind="info.mobilephone"></span>
											<button type="button" ng-show="dataSta&&hasPermit('merchantBusinessProduct.getDataProcessing')" ng-click="getDataProcessing()">显示</button>
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">法人姓名：</label>
										<div class="col-sm-2 checkbox" ng-bind="info.lawyer">
										</div>
										<label class="col-sm-2 control-label">法人身份证号：</label>
										<div class="col-sm-3 checkbox" >
											<span ng-bind="info.idCardNo"></span>
											<button type="button" ng-show="dataSta&&hasPermit('merchantBusinessProduct.getDataProcessing')" ng-click="getDataProcessing()">显示</button>
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">一级代理商：</label>
										<div class="col-sm-2 checkbox" ng-bind="agent.agentName">
										</div>
										<label class="col-sm-2 control-label">一级代理商所属销售：</label>
										<div class="col-sm-2 checkbox" ng-bind="agent.saleName">
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">进件来源：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.itemSource|formatDropping:merItemSourceList">
										</div>
										<label class="col-sm-2 control-label">业务产品：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.bpName">
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">状态：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.status|formatDropping:itemStatus">
										</div>
										<label class="col-sm-2 control-label">冻结金额：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.controlAmount">
										</div>
									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">预冻结金额：</label>
										<div class="col-sm-2 checkbox" ng-bind="info.preFrozenAmount">
										</div>
										<label class="col-sm-2 control-label">商户状态：</label>
										<div class="col-sm-2 checkbox" ng-bind="info.status|formatDropping:merStatusList">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">所属代理商：</label>
										<div class="col-sm-2 checkbox" ng-bind="merAgent.agentName">
										</div>
										<label class="col-sm-2 control-label">自动审核OCR通道：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.ocrName">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">自动审核活体通道：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.autoMbpChannelName">
										</div>
										<label class="col-sm-2 control-label">自动审核人脸/人证通道：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.faceName">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">鉴权通道：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.realAuthChannelName"></div>
										<!--<label class="col-sm-2 control-label">自动审核活体通道：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.huoTiChannel">
										</div>-->
										<label class="col-sm-2 control-label">是否特约商户：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.specialMerchant"></div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">特约商户编号：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.acqMerchantNo"></div>
										<label class="col-sm-2 control-label">特约商户名称：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.acqMerchantName"></div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">特约商户绑定时间：</label>
										<div class="col-sm-2 checkbox" ng-bind="mbp.bindGeneralMerchantTime | date:'yyyy-MM-dd HH:mm:ss'"></div>
										<label class="col-sm-2 control-label">默认购买资金损失险：</label>
										<div class="col-sm-4 checkbox">
											{{mbp.everyTimes | formatDropping: bool}}
											<a style="margin-left: 10px" ng-click="showZjxMerSwitchLogModal()">变更记录</a>
										</div>

									</div>
								</div>
							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>机具信息</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group" ng-repeat="val in terminal">
										<label class="col-sm-2 control-label">业务产品：</label>
										<div class="col-sm-2 checkbox" ng-bind="val.bpName">
										</div>
										<label class="col-sm-2 control-label">机具号：</label>
										<div class="col-sm-2 checkbox" ng-bind="val.sn">
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">机具总数：</label>
										<div class="col-sm-2 checkbox" ng-bind="terminalTotal">
										</div>
									</div>
								</div>
							</div>

							<div class="panel-body ibox float-e-margins">

								<div class="ibox-title">
									<h5>经营信息</h5>
								</div>
								<div class="ibox-content">

									<div class="form-group">
										<label class="col-sm-2 control-label">商户类型：</label>
										<div class="col-sm-2 checkbox" ng-bind="merchantTypes(info.merchantType)">
										</div>
									</div>

									<div class="form-group" ng-show="info.address!=null">
										<label class="col-sm-2 control-label">经营地址：</label>
										<div class="col-sm-4 checkbox" ng-bind="info.address">
										</div>
									</div>

									<div class="form-group" ng-hide="info.merchantType==1">
										<label class="col-sm-2 control-label">经营范围：</label>
										<div class="col-sm-1 checkbox" ng-bind="info.sysName">
										</div>
										<div class="col-sm-2 checkbox" ng-bind="info.twoSysName">
										</div>
									</div>

								</div>
							</div>
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>备注</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<div class="col-sm-3">
											<textarea rows="5" cols="100" disabled="disabled" class="form-control" ng-model="info.remark"/>
										</div>
									</div>

								</div>
							</div>
							<div class="panel-body ibox float-e-margins">

								<div class="ibox-title">
									<h5>最近预冻结操作</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle auditDetail" style="height: 200px;" ui-grid-resize-columns ui-grid="preFrozenRecords"/>
								</div>

							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>最近的进件信息变更记录</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle auditDetail" style="height: 200px;" ui-grid-resize-columns ui-grid="merchantRequireHistoryGrid"/>
								</div>
							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>更改业务产品记录</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle auditDetail" style="height: 200px;" ui-grid-resize-columns ui-grid="merchantBusinessProductHistoryGrid"/>
								</div>
							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>审核记录</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle auditDetail" style="height: 200px;" ui-grid-resize-columns ui-grid="merchantRecords"/>
								</div>

							</div>

							<div class="panel-body ibox float-e-margins">

								<div class="ibox-title">
									<h5>复审记录</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle auditDetail" style="height: 200px;" ui-grid-resize-columns ui-grid="remerchantRecords"/>
								</div>

							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>自动审核记录</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<label class="col-sm-2 control-label">自动审核次数：</label>
										<div class="col-sm-1 checkbox" ng-bind="mbp.autoCheckTimes">
										</div>
										<label class="col-sm-2 control-label">是否经过自动审核：</label>
										<div class="col-sm-1 checkbox" ng-bind="isCheck">
										</div>
										<label class="col-sm-2 control-label">自动审核结论：</label>
										<div class="col-sm-2 checkbox" ng-bind="checkStatus">
										</div>
									</div>
									<div class="form-group">
										<div class="gridStyle auditDetail" style="height: 300px;" ui-grid-resize-columns ui-grid="merchantCheckRecords"/>
									</div>
								</div>
							</div>

							<div class="panel-body ibox float-e-margins">

								<div class="ibox-title">
									<h5>明细</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<div class="gridStyle auditDetail" style="height: 500px;" ui-grid-resize-columns ui-grid="merchantDetailed"/>
									</div>
									<div class="form-group" style="padding-bottom: 20px;">
										<div class="col-img"  ng-repeat="m in listMris">
											<div>{{m.itemName}}</div>
											<div><a href="{{m.content}}" fancybox rel="group" title="{{m.remark}}"> <img width="250px" height="150px" ng-src="{{m.content}}"/></a></div>
										</div>
									</div>
								</div>


							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>黑名单操作日志</h5>
								</div>
								<div class="ibox-content">
									<div class="gridStyle auditDetail" style="height: 200px;" ui-grid-resize-columns ui-grid="blackRecords"/>
								</div>
							</div>

						</uib-tab>

						<uib-tab>
							<uib-tab-heading> 
								<span
										class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
										class="font-bold">服务费率</strong>
								</span>
							</uib-tab-heading>

							<div class="panel-body">
								<div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid="merchantRateList"/>
								<div class="block m-t-xs">
									<strong>备注：</strong><br/>
									每笔固定金额1元，则填写商户费率1.00；<br/>
									每笔扣率为0.1%则填写商户费率0.1%<br/>
									每笔扣率为0.1%，封顶3元，保底1元则填写商户费率1.00~0.1%~3.00；<br/>
									每笔扣率为0.1%加上固定金额1元，则填写商户费率0.1%+1.00；<br/>
									单笔阶梯扣率如10000.00元以下，扣率0.38%，10000.00元及以上扣率0.37%，则填写0<0.38%<10000.00;10000.00<=0.37%;<br/>
									每笔扣率为0.1%，封顶3元，则填写商户费率0.1%~3.00；<br/>
								</div>
							</div>
						</uib-tab>

						<uib-tab>
							<uib-tab-heading> 
								<span
										class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
										class="font-bold">服务限额</strong>
								</span>
							</uib-tab-heading>
							<div class="panel-body">
								<div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid="merchantQuotaList"/>
							</div>
						</uib-tab>

						<uib-tab>
							<uib-tab-heading> 
								<span
										class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
										class="font-bold">服务状态</strong>
								</span>
							</uib-tab-heading>
							<div class="panel-body">
								<div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid="serviceStatusMgr"/>
							</div>
							<div class="panel-body">
                                <div class="ibox-title">
                                    <h5>同步日志</h5>
                                </div>
                                <div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid="merInfoLogMgr"/>
                            </div>
						</uib-tab>


						<uib-tab>
							<uib-tab-heading> 
								<span
										class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
										class="font-bold">账户信息</strong>
								</span>
							</uib-tab-heading>
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>账户余额</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid="accountBalance"/>
									</div>
								</div>
							</div>
							<div ng-show="mbp.status==4" class="panel-body ibox float-e-margins">
								<div class="form-group">
									<label class="col-sm-2 control-label">中钢账户余额(元)：</label>
									<div class="col-sm-2 checkbox" >
										<span ng-bind="zgye"></span>
										<button type="button"  ng-click="selectZGYE()">查询</button>
									</div>
								</div>
								<div class="form-group">
									<label class="col-sm-2 control-label">易票联账户余额(元)：</label>
									<div class="col-sm-2 checkbox" >
										<span ng-bind="yplye"></span>
										<button type="button"  ng-click="selectYPLYE()">查询</button>
									</div>
								</div>
							</div>
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>账户明细</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<!-- 	                        			<label class="col-sm-2 control-label">账号：</label> -->
										<!-- 										<div class="col-sm-3"> -->
										<!-- 											<input type="text" class="form-control" ng-model="accountInfo.accountNo"> -->
										<!-- 										</div> -->
										<label class="col-sm-2 control-label">操作：</label>
										<div class="col-sm-3">
											<select class="form-control" ng-model="accountInfo.operation" ng-options="x.value as x.text for x in operations"/>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">交易时间：</label>
										<div class="col-sm-8">
											<input ng-model="accountInfo.sdate" type="datetime" style="width:auto;display:inline-block;" class="form-control" date-time min-view="date" view="date" format="YYYY-MM-DD">
											-
											<div style="position: relative; display: inline-block">
												<input ng-model="accountInfo.edate" type="datetime" style="width:auto;display:inline-block;" class="form-control" date-time min-view="date" view="date"  format="YYYY-MM-DD">
											</div>
										</div>

									</div>
									<div class="form-group">
										<div class="col-lg-12">
											<div class="col-sm-2"></div>
											<button class="btn btn-primary6 btn-mr20" type="button"
													ng-click="selectAccountInfo()" id="btnSubmit">查询</button>
											<button class="btn btn-primary3" type="button"
													ng-click="clearAccountInfo()" id="btnClear">清空</button>
										</div>
									</div>

									<div class="form-group">
										<div class="grid" ui-grid-resize-columns ui-grid-pagination ui-grid-selection ui-grid-pinning ui-grid="accountDetailMgr"/>
									</div>
								</div>


							</div>
						</uib-tab>

						<uib-tab>
							<uib-tab-heading>
								<span
										class="block m-t-xs"> <i class="fa fa-laptop"></i> <strong
										class="font-bold">其他账户</strong>
								</span>
							</uib-tab-heading>
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>账户记录</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<div class="gridStyle" style="height: 200px;" ui-grid-resize-columns ui-grid-pinning ui-grid="embAccountGrid"/>
									</div>
								</div>
							</div>

							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>账户明细</h5>
								</div>
								<div class="ibox-content">

									<div class="form-group">
										<label class="col-sm-2 control-label">获得时间：</label>
										<div class="col-sm-6">
											<datepicker>
											<input ng-model="embInfo.startTime" type="text" style="width:auto;display:inline-block;" class="form-control" date-time min-view="date" view="date" format="YYYY-MM-DD">
											</datepicker>
											-
											<div style="position: relative; display: inline-block">
												<input ng-model="embInfo.endTime" type="datetime" style="width:auto;display:inline-block;" class="form-control" date-time min-view="date" view="date"  format="YYYY-MM-DD">
											</div>
										</div>

										<label class="col-sm-2 control-label">参与活动行为：</label>
										<div class="col-sm-2">
											<div style="position: relative; display: inline-block">
												<select class="form-control" style="width:auto;" ng-model="embInfo.coupCode" ng-options="x.value as x.text for x in couponCodes" />
											</div>
										</div>
									</div>
									<div class="form-group">


										<label class="col-sm-2 control-label">购买金额：</label>
										<div class="col-sm-6">
											<input ng-model="embInfo.payAmountBeg" type="text" style="width:auto;display:inline-block;" class="form-control" >
											-
											<div style="position: relative; display: inline-block">
												<input ng-model="embInfo.payAmountEnd" type="text" style="width:auto;display:inline-block;" class="form-control" >
											</div>
										</div>

									</div>

									<div class="form-group">
										<label class="col-sm-2 control-label">赠送金额：</label>
										<div class="col-sm-8">
											<input ng-model="embInfo.giftAmountBeg" type="text" style="width:auto;display:inline-block;" class="form-control" >
											-
											<div style="position: relative; display: inline-block">
												<input ng-model="embInfo.giftAmountEnd" type="text" style="width:auto;display:inline-block;" class="form-control" >
											</div>
										</div>
									</div>
									<div class="form-group">
										<label class="col-sm-2 control-label">券编号：</label>
										<div class="col-sm-8">
											<input ng-model="embInfo.couponNoBeg" type="text" style="width:auto;display:inline-block;" class="form-control" >
											-
											<div style="position: relative; display: inline-block">
												<input ng-model="embInfo.couponNoEnd" type="text" style="width:auto;display:inline-block;" class="form-control" >
											</div>
										</div>
									</div>
									<div class="form-group">
										<div class="col-lg-12">
											<div class="col-sm-2"></div>
											<button class="btn btn-primary6 btn-mr20" type="button"
													ng-click="selectEmbInfo()" id="embBtnSubmit">查询</button>
											<button class="btn btn-primary3" type="button"
													ng-click="clearEmbInfo()" id="embBtnClear">清空</button>
										</div>
									</div>

									<div class="form-group">
										<div class="grid" style="height: 300px" ui-grid-auto-resize ui-grid-resize-columns ui-grid-pagination ui-grid-selection ui-grid-pinning ui-grid="embAccListGrid"/>
									</div>
								</div>
							</div>
							<div class="panel-body ibox float-e-margins">
								<div class="ibox-title">
									<h5>使用明细</h5>
								</div>
								<div class="ibox-content">
									<div class="form-group">
										<div class="gridStyle" style="height: 250px;" ui-grid-pagination ui-grid-resize-columns ui-grid="embAccUseListGrid"/>
									</div>
								</div>
							</div>

						</uib-tab>

					</uib-tabset>

				</div>
			</div>
		</div>
		<div class="col-lg-12 bgff">
			<div class="col-sm-12">
				<div class="col-sm-2"></div>
				<div class="col-sm-6"><a class="btn btn-primary4 btn-rounded" type="button" ui-sref="merchant.queryMer"
										 id="btnBack">返回</a></div>
			</div>
		</div>

	</form>
	 <div id="zjxMerSwitchLogModal" class="modal fade form-horizontal" tabindex="3" role="dialog">
		<div class="modal-dialog" style="width: 1000px">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						&times;</button>
					<h3 class="modal-title">默认购买资金损失险变更记录</h3>
				</div>
				<div class="modal-body">
					<div class="form-group">
						<div style="height:420px" ui-grid="zjxMerSwitchLogGrid" ui-grid-resize-columns ui-grid-pinning ui-grid-auto-resize class="grid"></div>
					</div>
				</div>
				<div class="modal-footer">
					<div class="form-group control-label">
						<label class="col-sm-2 control-label"></label>
						<div class="col-sm-5">
							<button class="btn btn-primary8" type="button" ng-click='cancel()'>关闭</button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
